package com.whut.util;

import java.util.Random;

public class RandomCodeUtils {
    /**
     * 生成六位随机验证码
     * @return 随机验证码字符串
     */
    public static String get6BitRandom() {
        Random random = new Random();
        StringBuilder code = new StringBuilder();
        for (int i = 0; i < 6; i++) {
            code.append(random.nextInt(10)); // 生成0-9之间的随机数字
        }
        return code.toString();
    }
}
